<%@ page import="com.example.qsmx.QSMXValue" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: 86177
  Date: 2024/11/2
  Time: 20:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<link href="<%=request.getContextPath()%>/css/revelMain.css" rel="stylesheet">
<main>
    <div class="div_main text-center">
        <% //调用获取的集合
            String parameter = request.getParameter("value");
            HttpSession session1 = request.getSession();
            Object value = session1.getAttribute("userAccount");
            System.out.println(value);
            List<QSMXValue> qsmxValues = QSMXValue.getMyViewQSMXValue(value.toString(), parameter);
        %>
        <%for (QSMXValue qsmxValue : qsmxValues) {%>
        <div class="wenZhang">
            <div class="n">
                <a href="<%=request.getContextPath()%>/qsmx-show?id=<%=qsmxValue.getId()%>">
                    <img src="<%=qsmxValue.getCover()%>"
                         class="img-fluid rounded" alt="<%=qsmxValue.getCover()%>"
                         style="width: 150px; height: 100px; object-fit: cover;"></a>
            </div>
            <div class="Jianjie1">
                <a href="<%=request.getContextPath()%>/qsmx-show?id=<%=qsmxValue.getId()%>">
                    <div class="n1 qsmx-title"><%=qsmxValue.getTittle()%>
                    </div>
                </a>
                <a href="<%=request.getContextPath()%>/qsmx-show?id=<%=qsmxValue.getId()%>">
                    <div class="n1 qsmx-content"><%=qsmxValue.getContent()%>
                    </div>
                </a>
            </div>
            <div class="Jianjie2">
                <a href="<%=request.getContextPath()%>/qsmx-show?id=<%=qsmxValue.getId()%>">
                    <div class="n2"><%=qsmxValue.getValueUserAccount()%>
                    </div>
                </a>
                <a href="<%=request.getContextPath()%>/qsmx-show?id=<%=qsmxValue.getId()%>">
                    <div class="n2"><%=qsmxValue.getCreateTime()%>
                    </div>
                </a>
            </div>
            <div class="Jianjie3">
                <div class="col">
                    <form action="<%=request.getContextPath()%>/modify-qsmx" method="post">
                        <input type="hidden" name="userid-1" style="display: none" value=<%=qsmxValue.getId()%>>
                        <button type="submit" class="tit1">修改</button>
                    </form>
                </div>
                <div class="col">
                    <form action="<%=request.getContextPath()%>/revise-value" method="post">
                        <input type="hidden" name="userid-1" style="display: none" value=<%=qsmxValue.getId()%>>
                        <button type="submit" class="tit1">删除</button>
                    </form>
                </div>
            </div>
        </div>
        <%}%>
    </div>
</main>
